<template>
  <!-- 音频列表 -->
  <div class="audio-list">
    <div v-for="(item, index) in list" :key="index" class="audio-item">
      <div class="left-part">
        <img :src="item.img" />
        <div class="cover flex-align-center">
          <img src="../assets/images/icon-play-btn.png" />
        </div>
      </div>
      <div class="right-part">
        <p class="title">{{ item.title }}</p>
        <div class="wave">
          <div class="sound-wave" v-for="i in 6" :key="i">
            <div class="wave-item"></div>
            <div class="wave-item"></div>
            <div class="wave-item"></div>
            <div class="wave-item"></div>
            <div class="wave-item" style="height:1.9rem"></div>
            <div class="wave-item" style="height:2.1rem"></div>
            <div class="wave-item" style="height:2.3rem"></div>
            <div class="wave-item" style="height:2.7rem"></div>
            <div class="wave-item" style="height:2.3rem"></div>
            <div class="wave-item" style="height:2.1rem"></div>
            <div class="wave-item" style="height:1.9rem"></div>
            <div class="wave-item"></div>
            <div class="wave-item"></div>
            <div class="wave-item"></div>
          </div>
        </div>
        <p class="time">02:23</p>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      list: {
        type: Array,
        default: () => [],
      },
    },
    data() {
      return {};
    },
    methods: {},
  };
</script>

<style lang="less" scoped>
  .audio-list {
    .audio-item {
      width: 100%;
      height: 18.7rem;
      background: rgba(0, 0, 0, 0.4);
      border-radius: 2rem;
      margin-bottom: 4rem;
      display: flex;
      .left-part {
        position: relative;
        background: red;
        overflow: hidden;
        width: 18.7rem;
        height: 18.7rem;
        border-radius: 2rem;
        flex: none;
        .cover {
          width: 18.7rem;
          height: 18.7rem;
          background: rgba(0, 0, 0, 0.6);
          border-radius: 2rem;
          img {
            width: 5rem;
            height: 5rem;
          }
        }
      }
      .right-part {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin: 2rem;
        overflow: hidden;
        .title {
          font-size: 2.8rem;
          font-weight: 800;
          color: var(--textBrightColor);
          line-height: 3.2rem;
        }
        .wave {
          display: flex;
        }
        .sound-wave {
          display: flex;
          align-items: center;
          .wave-item {
            margin-right: 0.3rem;
            width: 0.3rem;
            height: 1.7rem;
            // background: #000000;
            // background: #6c6c6c;
            background: var(--textGrayColor);
            // border: .2rem solid #ffffff;
            border-radius: 0.1rem;
          }
        }
        .time {
          font-size: 2.4rem;
          color: var(--textBrightColor);
        }
      }
    }
  }
</style>
